/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package View;


import com.sun.lwuit.Command;
import com.sun.lwuit.Display;
import com.sun.lwuit.Image;
import com.sun.lwuit.Label;
import com.sun.lwuit.TextArea;
import com.sun.lwuit.animations.CommonTransitions;
import com.sun.lwuit.events.ActionEvent;
import java.io.IOException;
import testmenu.MainMidlet;

/**
 *
 * @author Windsea
 */
public class AboutForm extends View {
    
    private Label lb1;
    Command backCommand;
    
    public AboutForm(final MainMidlet midlet) {
        super(midlet);
        setTitle("About");
        
        setTransitionOutAnimator(CommonTransitions.createSlide(
                CommonTransitions.SLIDE_VERTICAL, true, 2000));
        Label lb1 = new Label("Sức khỏe hàng ngày");
        lb1.getStyle().setAlignment(Label.CENTER);
        TextArea ta = new TextArea(5, 20);
        ta.getStyle().setAlignment(TextArea.CENTER);
        ta.setText("Asha Hackathon\nApp name: Sức khỏe hàng ngày\nVersion: 1.0\nVendor: 13");
        
        
        ta.setEditable(false);
        addComponent(lb1);
        addComponent(ta);
        backCommand = new Command("Back") {
            public void actionPerformed(ActionEvent evt) {
                 Display.getInstance().setForceFullScreen(true);
                midlet.ShowMainMenuForm();
            }
        };
        try {
            addComponent(new Label(Image.createImage("/icon.png")));
        } catch (IOException ex) {
            ex.printStackTrace();
        }
        addCommand(backCommand);
        setBackCommand(backCommand);
    }
}
